﻿namespace FalloutModStudio
{
    using Caliburn.Micro;

    using FalloutModStudio.ViewModels;

    using Slf;

    using SLF.SmartInspectFacade;

    public class AppBootstrapper : TypedAutofacBootstrapper<MainViewModel>
    {
        #region Fields

        protected readonly ILog _logger = LogManager.GetLog(typeof(AppBootstrapper));

        #endregion

        static AppBootstrapper()
        {
            // Configure default application logging
            ILogger logger = new SmartInspectLogger();
            LoggerService.SetLogger(logger);

            // Configure Caliburn.Micro logging to use the same logger
            LogManager.GetLog = type => new CaliburnMicroLogger(typeof(AppBootstrapper));
        }

        protected override void ConfigureContainer(Autofac.ContainerBuilder builder)
        {
            this._logger.Info("Configuring application container.");
            base.ConfigureContainer(builder);

            // Register application types and custom modules here...
            // builder.RegisterModule<RegistrationModule>();
        }
    }
}
